"""
返回错误码
"""

from enum import Enum

__all__ = ['RetCode']

class RetCode(Enum):
	PAUSED = -99
	FAILED = -1
	SUCCESS = 0
	ID_ERROR = 1
	PASSWORD_ERROR = 2
	LACK_PASSWORD = 3
	MKDIR_ERROR = 5
	URL_INVALID = 6
	FILE_CANCELLED = 7
	PATH_ERROR = 8
	NETWORK_ERROR = 9
	CAPTCHA_ERROR = 10
	UP_COMMIT_ERROR = 4  # 上传文件 commit 错误
	UP_CREATE_ERROR = 11  # 创建上传任务出错
	UP_UNKNOWN_ERROR = 12  # 创建上传任务未知错误
	UP_EXHAUSTED_ERROR = 13  # 上传量用完
	UP_ILLEGAL_ERROR = 14  # 文件非法
	PARAMS_ERROR = 15 # 参数错误

class TransferType(Enum):
	DOWNLOAD = 0
	UPLOAD = 1
		
class TransferStatus(Enum):
	FAILED = -1
	WAITING = 0
	TRANSFERING = 1
	SUCCESS = 2
	PAUSING = 10
	PAUSED = 11
	DELETING = 12
	RESUMING = 13